<?php
require_once("Tpl/header.html");
?>
        <div id="main">
            <div class="header">
                <h1>Add User</h1>
            </div>
            <div class="content">
                <form action="/index.php/Member/adduser" method="post" class="pure-form pure-form-aligned">
                    <div class="error">{$error}</div>
                    <fieldset>
                        <div class="pure-control-group">
                            <label for="loginname">用户名</label>
                            <input type="text" id="loginname" name="loginname" placeholder="LoginName" >
                        </div>
                        <div class="pure-control-group">
                            <label for="password">密码</label>
                            <input type="password" id="password" name="password" placeholder="PassWord">
                            <!-- md5 for transmit hidden(safety of client), what's more? RSA(safety for server)
                            <input type="password" id="mpassword" name="mpassword" placeholder="PassWord">
                            <input type="hidden" id="password" name="password"> -->
                        </div>
                        <div class="pure-control-group">
                            <label for="username">姓名</label>
                            <input type="text" id="username" name="username" placeholder="UserName" >
                        </div>
                        <div class="pure-control-group">
                            <label for="username">E-mail</label>
                            <input type="text" id="email" name="email" placeholder="E-mail" >
                        </div>
                        <div class="pure-control-group">
                            <label for "level">组别</label>
                            <select id="level" name="level">
                                <option value="1">学生</option>
                                <option value="2">教师</option>
                                <option value="3">管理员</option>
                            </select>
                        </div>
                        <div class="pure-controls">
                            <button type="submit" class="pure-button pure-button-primary">Add</button>
                        </div>
                    </fieldset>
                </form>
                <!-- <script>
                $(function(){
                  $("form").submit(function() {
                    var v=$.md5($("#mpassword").val());
                    $("#password").val(v);
                    $("#mpassword").attr("disabled", "true");
                    return true;
                  });
                });
                </script> -->
            </div>
        </div>
    </div>
</body>
</html>
